package com.zyh.controller;

import com.zyh.service.TrandServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


@Component
@EnableScheduling
public class TrandTasks {

    @Qualifier("TrandServiceImpl")
    @Autowired
    private TrandServiceImpl trandService;

    //每天8-18点 一个小时执行
    @Scheduled(cron = "0 00/60 8-18 * * ?")
    public void run(){


        System.out.println("start 查询大额查询结果....");

          trandService.queryBigAccountResult();

        System.out.println("end 大额查询结果ok....");

    }
}
